//
//  String+TimeLine.swift
//  MagaCore
//
//  Created by qmdjx on 2023/5/18.
//

import Foundation

extension Int {
  func ht_formatTimeLine() -> String {
    let var_hours = self / 3600
    let var_minutes = (self % 3600) / 60
    let var_seconds = (self % 3600) % 60
    if self > 3600 {
      return String(format:"%02d:%02d:%02d", var_hours, var_minutes, var_seconds)
    } else {
      return String(format:"%02d:%02d", var_minutes, var_seconds)
    }
  }
}
